package com.regent.central.bill.service.bean;

import com.regent.central.bill.core.SaleOrderRemark;
import com.regent.central.bill.repository.SaleOrderRemarkMapper;
import com.regent.central.bill.service.SaleOrderRemarkService;
import com.regent.central.infrastructure.service.bean.DomainServiceBean;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SaleOrderRemarkServiceBean extends DomainServiceBean<SaleOrderRemarkMapper, SaleOrderRemark> implements SaleOrderRemarkService {

    /**
     * 伪删除
     *
     * @param saleOrderRemarkId 销售单备注ID
     * @param userDeleted       删除人
     */
    @Override
    public void hide(String saleOrderRemarkId, String userDeleted) {
        mapper.hide(saleOrderRemarkId, System.currentTimeMillis(), userDeleted);
    }

    /**
     * 获取销售单的备注列表
     *
     * @param saleOrderId 销售单ID
     * @return 销售单的备注列表
     */
    @Override
    public List<SaleOrderRemark> getSaleOrderRemarks(String saleOrderId) {
        return mapper.getSaleOrderRemarks(saleOrderId);
    }

}